package com.bort.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bort.system.model.Menu;
import com.bort.system.model.User;
import com.bort.system.model.vo.Admin;
import com.bort.system.model.vo.VipUser;
import com.bort.system.utils.Pager;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    int deleteByPrimaryKey(Integer id);
    int insertSelective(User record);
    User selectByPrimaryKey(Integer id);
    int updateByPrimaryKeySelective(User record);

    List<Menu> selectPromisedMenus(@Param("userId")Integer userId);

    List<Admin> getUserList(Page pager,@Param("map") Map<String, Object> map);
    List<Admin> getUserList(@Param("map") Map<String, Object> map);

    List<VipUser> getVipUserList(Page pager,@Param("map") Map<String, Object> map);
    List<VipUser> getVipUserList(@Param("map") Map<String, Object> map);

}